import { createSlice } from '@reduxjs/toolkit'

export const ticketSlice = createSlice({
  name: 'ticket',
  initialState: {
     username:[]
  },
  reducers: {
    useName(state,action){
        state.username=action.payload
    }
  }
})
// 每个 case reducer 函数会生成对应的 Action creators
export const {useName } = ticketSlice.actions

export default ticketSlice.reducer